<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');
need_login();
need_admin();


$condition = array(
	'is_delete' => 0,
	'id<>1',
);

if($_GET['realname']){
    $condition[] = "realname like '%".mysql_escape_string(trim($_GET['realname']))."%'";
}


$count = Table::Count('user', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$users = DB::LimitQuery('user', array(
	'condition' => $condition,
	'order' => 'ORDER BY create_time DESC, id DESC',
	'size' => $pagesize,
	'offset' => $offset,
));

$current = 'manage_index';

include template('manage_index');